package com.ipzoe.common.enums;

public enum effectiveUnitEnum {
    DAY(1, "日"), MONTH(2, "月"), YEAR(3, "年");

    private final Integer code;
    private final String info;

    effectiveUnitEnum(Integer code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public Integer getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }

    public static String getDescription(Integer key) {
        if (key == null) {
            return "";
        } else {
            for (effectiveUnitEnum s : effectiveUnitEnum.values()) {
                if (s.getCode().equals(key)) {
                    return s.getInfo();
                }
            }
            return "";
        }
    }
}
